lets_plot.geo_data.geocode_counties

lets_plot.geo_data.geocode_counties(names=None)lets_plot.geo_data.geocoder.NamesGeocoder

Create a Geocoder object for counties. Allows to refine ambiguous request with where() method, with a scope that limits area of geocoding or with parents.

Parameters

names (str or list) – Names of objects to be geocoded.

Returns

Geocoder object specification.

Return type

NamesGeocoder

Examples

1
2
3
4
5
6
7
from IPython.display import display
from lets_plot import *
from lets_plot.geo_data import *
LetsPlot.setup_html()
counties = geocode_counties().scope('NY').get_boundaries(9)
display(counties.head())
ggplot() + geom_map(data=counties) + ggtitle('New York State Counties')
The geodata is provided by © OpenStreetMap contributors and is made available here under the Open Database License (ODbL).
county found name geometry
0 Cayuga County Cayuga County MULTIPOLYGON (((-76.70105 43.34515, -76.69830 ...
1 Kings County Kings County MULTIPOLYGON (((-73.83362 40.62021, -73.83362 ...
2 Queens County Queens County MULTIPOLYGON (((-73.75397 40.60978, -73.75122 ...
3 Suffolk County Suffolk County MULTIPOLYGON (((-72.36420 41.04622, -72.37244 ...
4 Richmond County Richmond County MULTIPOLYGON (((-74.07257 40.63688, -74.07257 ...